<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
<head>
    <title>测评用户管理</title>
<link href="../styles/xuanz.css" rel="stylesheet" type="text/css" />
<script src="../styles/script.js" type="text/javascript"></script>
</head>

<body>
<div id="neinei">
<div id="kuangkuang_admin">
<%@ include file="/common/left-admin.jsp"%>
<div class="kuangright">
<h1>IP地址管理</h1>
<s:form action="ipManager" method="post" onsubmit="return ipQuery();" namespace="/admin" theme="simple">
所属高校：
    <s:select
            label="所属高校"
            list="schoolList"
            name="schoolId"
            listKey="id"
            listValue="name"
            headerKey="-1"
            headerValue="--- 全部高校  ---"
            />
IP地址：
    <s:textfield name="name" />
    <s:submit value="查询"/>
    <table width="580" border="0" cellspacing="1" cellpadding="5">
      <tr align="center">
        <td width="10%" bgcolor="#f2f2f2">序号</td>
        <td width="40%" bgcolor="#f2f2f2">所属高校</td>
        <td width="20%" bgcolor="#f2f2f2">IP起始地址</td>
        <td width="20%" bgcolor="#f2f2f2">IP结束地址</td>
        <td width="10%" bgcolor="#f2f2f2">删除IP</td>
      </tr>
      <s:if test="ipList.size > 0">
        <s:iterator value="ipList" status="stat">
        <tr align="center">
          <td bgcolor="#FFFFFF">&nbsp;<s:property value="#stat.index + 1" /></td>
          <td bgcolor="#FFFFFF">&nbsp;<s:property value="school.name" /></td>
          <td bgcolor="#FFFFFF">&nbsp;<s:property value="fromIP" /></td>
          <td bgcolor="#FFFFFF">&nbsp;<s:property value="endIP" /></td>
          <s:url id="deleteUrl" action="ipDelete" namespace="/admin">
              <s:param name="id" value="id" />
          </s:url>
          <td bgcolor="#FFFFFF"><s:a href="%{deleteUrl}">删除</s:a></td>
        </tr>
        </s:iterator>
      </s:if>
    </table>
        
</s:form>
<br />
<div class="jsbox_ht_mainright"><b>添加新IP</b></div>
<div style="color:red;clear:both">
<s:fielderror />
</div>
<s:form action="ipAdd" onsubmit="return checkIPfrm();" method="post" namespace="/admin">
<s:textfield name="ip.fromIP" label="起始地址" onkeyup="fromChange(this.value);" cssStyle="width:150px"/>
<s:textfield name="ip.endIP" label="结束地址" cssStyle="width:150px"/>
<s:select
        label="所属高校"
        list="schoolList"
        name="addSchoolId"
        listKey="id"
        listValue="name"
        headerKey="-1"
        headerValue="--- 请选择高校  ---"
        cssStyle="width:155px"/>
<s:submit value="增加IP地址段"/>
</s:form>
<br />
<br />
</div>
</div>
</div>

</body>
</html>
